// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-vo.ts.hbs生成
import { ControlVOBase } from '@/core';
import { transformValue } from '@/utils';
import { model } from './usr-0301842048-form-model';

export class FormControlVO extends ControlVOBase {
	constructor(data: any) {
		//  表单预置字段
		data.srfwfmemo = data['srfwfmemo'] ? data['srfwfmemo'] : '';
		data.srffrontuf = data['srffrontuf'] ? data['srffrontuf'] : '';
		super(data);
		//  表单自持属性
		this.$ownKeys = [
			'srfupdatedate',
			'srforikey',
			'srfkey',
			'srfmajortext',
			'srftempmode',
			'srfuf',
			'srfdeid',
			'srfsourcekey',
			'department_number',
			'id',
			'department_name',
			'short_name',
			'sort',
			'organization_name',
		];
	}
	get srfupdatedate() {
		return this.$DO.update_time;
	}
	set srfupdatedate(value: any) {
		this.$DO.update_time = value;
	}
	get srfkey() {
		return this.$DO.id;
	}
	set srfkey(value: any) {
		this.$DO.id = value;
	}
	get srfmajortext() {
		return this.$DO.department_name;
	}
	set srfmajortext(value: any) {
		this.$DO.department_name = value;
	}
	get department_number() {
		return this.$DO.department_number;
	}
	set department_number(value: any) {
		this.$DO.department_number = value;
	}
	get id() {
		return this.$DO.id;
	}
	set id(value: any) {
		this.$DO.id = value;
	}
	get department_name() {
		return this.$DO.department_name;
	}
	set department_name(value: any) {
		this.$DO.department_name = value;
	}
	get short_name() {
		return this.$DO.short_name;
	}
	set short_name(value: any) {
		this.$DO.short_name = value;
	}
	get sort() {
		return this.$DO.sort;
	}
	set sort(value: any) {
		this.$DO.sort = value;
	}
	get organization_name() {
		return this.$DO.organization_name;
	}
	set organization_name(value: any) {
		this.$DO.organization_name = value;
	}
	// 界面主键标识
	get sys_department() {
		return this.$DO.id;
	}

	set sys_department(value: any) {
		this.$DO.id = value;
	}

	//  工作流预置字段
	srfwfmemo: any;
	srffrontuf: any;

	//  无实体属性表单项
	get srftempmode() {
		return this.$DO.srftempmode;
	}

	set srftempmode(value: any) {
		this.$DO.srftempmode = value;
	}

	//  表单重复器

	/**
	 * 返回后台数据
	 *
	 * @return {*}
	 * @memberof FormControlVO
	 */
	public getDo() {
		return {
			srffrontuf: this.srffrontuf,
			department_number: this.$DO.department_number,
			id: this.$DO.id,
			department_name: this.$DO.department_name,
			short_name: this.$DO.short_name,
			sort: this.$DO.sort,
			organization_name: this.$DO.organization_name,
			update_time: this.$DO.update_time,
		};
	}
}
